<!--
 * @轮子的作者: 轮子哥
 * @Date: 2023-10-13 10:45:04
 * @LastEditTime: 2023-11-15 11:40:20
-->
<template>
    <div class="leftMain">
        <div class="ss1">
            {{ $t('text.router.l41') }}
            <DialogLayout64 @returnData="init()">
                <span class="df">
                    <img class="addImg" src="../../assets/images/add.svg">
                    <div style="font-size: 13px;white-space: nowrap;">{{ $t('text.System.l306') }}</div>
                </span>
            </DialogLayout64>
        </div>
        <div class="leftTop2" v-for="item in planList" v-bind:key="item">
            <div class="df" @click="setPage(item)" :class="item.name == planDetail.name ? 'blueBg' : ''">
                <img class="img2" src="../../assets/images/icon.png" />
                <div class="items">{{ item.name }}</div>
            </div>
        </div>

        <DialogLayout65 @returnData="init()" :mode="0" title="吊毛方案">
            <span class="df">
                    <img class="addImg" src="../../assets/images/add.svg">
                    <div style="font-size: 13px;white-space: nowrap;">编辑1</div>
                </span>
        </DialogLayout65>

        <DialogLayout65 @returnData="init()" :mode="1" title="呀似乐雷">
            <span class="df">
                    <img class="addImg" src="../../assets/images/add.svg">
                    <div style="font-size: 13px;white-space: nowrap;">编辑2</div>
                </span>
        </DialogLayout65>
    </div>
</template>
    
<script>

import { moneyPlanFindList } from '../../http/api'

export default {
    name: "HomeView",
    components: {
    },
    data() {
        return {
            planList: [],
            planDetail: []
        }
    },
    mounted() {
        this.init()
    },
    methods: {

        init() {
            moneyPlanFindList().then(res => {
                if (res !== undefined) {
                    this.planList = res
                    console.log(this.planList)
                    if (res.length > 0) {
                        this.planDetail = res[0]
                        this.getPlanDetail()
                    }
                }
            }).catch()
        },

        getPlanDetail() {

        },

        setPage(item) {
            this.planDetail = item
            this.getPlanDetail()
        },
    },
    watch: {},
    computed: {},
}
</script>
    
<style scoped>
input {
    border: none;
    outline: none;
    text-align: end;
}

textarea {
    width: 100%;
    border: none;
    outline: none;
}


.ss1 {
    color: #6698ff;
    font-size: 17px;
    text-align: left;
    display: flex;
    justify-content: space-between;
}

.leftMain {
    min-width: 310px;
    padding: 0 10px;
    border-right: solid 1px var(--el-menu-border-color);
    overflow: auto;
    margin: 10px 0;
}

.leftTop2 {
    border: 1px solid #cecece;
    border-radius: 5px;
    margin-top: 10px;
    position: relative;
    color: gray;
}

.df {
    display: flex;
    align-items: center;
    padding: 6px 10px;
}

.img2 {
    width: 22px;
    height: 22px;
}

.items {
    margin-left: 15px;
    font-size: 12px;
    width: 100%;
    text-align: left;
}

.blueBg {
    background: #6698ff;
    color: white;
}

.backDiv {
    display: flex;
    flex: 1 1 0%;
    color: #6698ff;
    font-size: 13px;
    align-items: center;
    padding-left: 20px;
}

.backImg {
    width: 23px;
    height: 23px;
    padding-right: 5px;
}

.ss12 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #eee;
    padding: 7px 10px;
    color: gray;
    font-size: 12px;
    margin-bottom: 15px;
}

.ss11 {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 7px 10px;
    color: gray;
    font-size: 12px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: none;
}

input {
    border: none;
    outline: none;
    text-align: end;
}

textarea {
    width: 100%;
    border: none;
    outline: none;
}

.title {
    background: #f2f2f2;
    color: gray;
    height: 40px;
    line-height: 40px;
}

.title2 {
    background: #f2f2f2;
    color: gray;
    height: 40px;
    line-height: 40px;
    display: flex;
}

.rightMain {
    width: 100%;
    margin: 10px 15px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    margin-right: 20px;
}

.ss7 {
    display: flex;
    justify-content: space-between;
    border: 1px solid #eee;
    padding: 7px 10px;
    color: gray;
    font-size: 12px;
    margin-bottom: 15px;
}

.ss6 {
    display: flex;
    padding: 7px 10px;
    color: gray;
    font-size: 12px;
    flex-direction: column;
    min-width: 300px;
    padding: 30px 100px;
    overflow: auto;
    height: 100%;
    padding-top: 10px;
}

.sss6 {
    display: flex;
    padding: 7px 10px;
    color: gray;
    font-size: 12px;
    flex-direction: column;
    min-width: 300px;
    padding: 0px 100px;
    padding-top: 30px;
}

.ss5 {
    text-align: left;
    color: #444;
    padding: 7px 0px;
    font-size: 13px;
}

.addImg {
    width: 15px;
    height: 15px;
    padding-right: 3px;
}
</style>